home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
OC
/
OCPrefsStrings.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
6KB
|
171 lines
<* STANDARD- *> <* MAIN- *> <* INITIALISE- *>
MODULE OCPrefsStrings;
(****************************************************************
This file was created automatically by `FlexCat 1.5'
Do NOT edit by hand!
Oberon-A source description C 1994 by Albert Weinert
Using with Oberon-A Interfaces for AmigaOS Release 3.1
Modified for Oberon-A 1.5 by Frank Copeland
Application: OCPrefsStrings
Language : "english"
Version : 4
Description: OBERON-A:Catalogs/OCPrefsStrings.cd
****************************************************************)
IMPORT
lo := Locale, e := Exec, u := Utility, y := SYSTEM;
CONST
builtinlanguage = "english";
version = 4;
CONST
msg14* = 0;
msg15* = 1;
gui1* = 2;
gui2* = 3;
gui3* = 4;
gui4* = 5;
gui5* = 6;
gui9* = 7;
gui13* = 8;
gui14* = 9;
gui15* = 10;
gui16* = 11;
gui17* = 12;
gui18* = 13;
gui19* = 14;
gui20* = 15;
gui21* = 16;
gui22* = 17;
gui23* = 18;
gui24* = 19;
gui25* = 20;
gui26* = 21;
gui27* = 22;
gui28* = 23;
gui29* = 24;
gui30* = 25;
gui31* = 26;
gui32* = 27;
gui33* = 28;
gui34* = 29;
gui35* = 30;
gui36* = 31;
gui37* = 32;
gui38* = 33;
gui39* = 34;
gui40* = 35;
gui41* = 36;
gui42* = 37;
gui43* = 38;
TYPE
AppString = RECORD;
id : LONGINT;
str : e.LSTRPTR;
END;
AppStringArray = ARRAY 39 OF AppString;
VAR
AppStrings : AppStringArray;
catalog : lo.CatalogPtr;
PROCEDURE SetStrings;
BEGIN
AppStrings[0].id := msg14; AppStrings[0].str := y.ADR( " !! Too many arguments: select only one prefs file\n" );
AppStrings[1].id := msg15; AppStrings[1].str := y.ADR( " !! Out of memory\n" );
AppStrings[2].id := gui1; AppStrings[2].str := y.ADR( "OCPrefs Notice" );
AppStrings[3].id := gui2; AppStrings[3].str := y.ADR( "Continue" );
AppStrings[4].id := gui3; AppStrings[4].str := y.ADR( "Could not create ReqTools FileRequester" );
AppStrings[5].id := gui4; AppStrings[5].str := y.ADR( "About OCPrefs" );
AppStrings[6].id := gui5; AppStrings[6].str := y.ADR( "Preferences editor for OC\n\n"
"Written by Frank Copeland\n"
"Using Oberon-A and EAGUI\n\n"
"See OCPrefs.doc for conditions of use" );
AppStrings[7].id := gui9; AppStrings[7].str := y.ADR( "Quit" );
AppStrings[8].id := gui13; AppStrings[8].str := y.ADR( "Choose a preferences file" );
AppStrings[9].id := gui14; AppStrings[9].str := y.ADR( "Could not load preferences file" );
AppStrings[10].id := gui15; AppStrings[10].str := y.ADR( "Could not save preferences file" );
AppStrings[11].id := gui16; AppStrings[11].str := y.ADR( "Settings :" );
AppStrings[12].id := gui17; AppStrings[12].str := y.ADR( "Add" );
AppStrings[13].id := gui18; AppStrings[13].str := y.ADR( "Delete" );
AppStrings[14].id := gui19; AppStrings[14].str := y.ADR( "Search Paths" );
AppStrings[15].id := gui20; AppStrings[15].str := y.ADR( "Symbol Files" );
AppStrings[16].id := gui21; AppStrings[16].str := y.ADR( "Object Files" );
AppStrings[17].id := gui22; AppStrings[17].str := y.ADR( "Error Files" );
AppStrings[18].id := gui23; AppStrings[18].str := y.ADR( "Output Paths & Extensions" );
AppStrings[19].id := gui24; AppStrings[19].str := y.ADR( "Misc" );
AppStrings[20].id := gui25; AppStrings[20].str := y.ADR( "Pragmas" );
AppStrings[21].id := gui26; AppStrings[21].str := y.ADR( "Options and Pragmas..." );
AppStrings[22].id := gui27; AppStrings[22].str := y.ADR( "Accept" );
AppStrings[23].id := gui28; AppStrings[23].str := y.ADR( "Cancel" );
AppStrings[24].id := gui29; AppStrings[24].str := y.ADR( "Options and Pragmas" );
AppStrings[25].id := gui30; AppStrings[25].str := y.ADR( "Options" );
AppStrings[26].id := gui31; AppStrings[26].str := y.ADR( "Set" );
AppStrings[27].id := gui32; AppStrings[27].str := y.ADR( "Clear" );
AppStrings[28].id := gui33; AppStrings[28].str := y.ADR( "Selectors" );
AppStrings[29].id := gui34; AppStrings[29].str := y.ADR( "Code" );
AppStrings[30].id := gui35; AppStrings[30].str := y.ADR( "Data" );
AppStrings[31].id := gui36; AppStrings[31].str := y.ADR( "Buffers" );
AppStrings[32].id := gui37; AppStrings[32].str := y.ADR( "Save" );
AppStrings[33].id := gui38; AppStrings[33].str := y.ADR( "Use" );
AppStrings[34].id := gui39; AppStrings[34].str := y.ADR( "OCPrefs" );
AppStrings[35].id := gui40; AppStrings[35].str := y.ADR( "About..." );
AppStrings[36].id := gui41; AppStrings[36].str := y.ADR( "Save As..." );
AppStrings[37].id := gui42; AppStrings[37].str := y.ADR( "Could not create icon '%s'" );
AppStrings[38].id := gui43; AppStrings[38].str := y.ADR( "Could not get default icon" );
END SetStrings;
PROCEDURE CloseCatalog*();
BEGIN
IF catalog # NIL THEN lo.CloseCatalog (catalog); catalog:=NIL END;
END CloseCatalog;
PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
VAR Tag : ARRAY 4 OF u.TagItem;
BEGIN
CloseCatalog();
IF (catalog = NIL) & (lo.base # NIL) THEN
Tag[0].tag := lo.builtInLanguage; Tag[0].data := y.ADR( builtinlanguage );
Tag[1].tag := u.ignore; Tag[1].data := y.ADR( language );
Tag[2].tag := lo.version; Tag[2].data := version;
Tag[3].tag := u.done;
IF language # "" THEN
Tag[1].tag:= lo.language;
END;
catalog := lo.OpenCatalogA (loc, "OCPrefsStrings.catalog", Tag);
END;
END OpenCatalog;
PROCEDURE GetString* (num: LONGINT): e.LSTRPTR;
VAR
i: LONGINT;
default: e.LSTRPTR;
BEGIN
i := 0; WHILE (i < 39) & (AppStrings[i].id # num) DO INC (i) END;
IF i # 39 THEN
default := AppStrings[i].str;
ELSE
default := NIL;
END;
IF catalog # NIL THEN
RETURN lo.GetCatalogStr (catalog, num, default^);
ELSE
RETURN default;
END;
END GetString;
BEGIN
catalog := NIL;
SetStrings;
END OCPrefsStrings.